package week_home_work01;

import java.util.Scanner;

/**
 * @author zdl
 * @date 2024/11/7
 */
public class Test2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入三个整数:");
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d =min(a,b,c);
        System.out.println("最小值为:"+d);
    }

    /**
     * 让用户依次录入三个整数，求出三个数中的最小值，并打印到控制台。
     */
    public static int min(int a, int b, int c) {
        if (a < b && a < c) {
            return a;
        } else if (b < a && b < c) {
            return b;
        } else if (c < a && c < b) {
            return c;
        }else {
            return 0;
        }


    }
}
